<include file="public@header"/>
<style>
	/*table{ border:1px solid #000; width:80%; font-size:1rem; margin-bottom:20px}
	td{border:1px solid #000; padding:0 5px; height:2rem; text-align:center}*/

	.content_nav .check_info{flex:1; display:flex;flex-direction: column;align-items: center;justify-content: center;}
	.form-horizontal .control-group1 {
		float: left;
		width: 15%;
		margin-bottom: 20px;
	}
	.form-horizontal .control-label {width:80px;}
	.form-horizontal .controls {margin-left:90px;}
    .result_dep .form-control{
        width: 100% !important;}

</style>
</head>
<body>
	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
			<li class="active"><a href="{:url('Aftersale/check')}">寄存业务</a></li>
		</ul>
        <!--改版画面-->
        <div class="form-horizontal">
        <div class="div_title"><span>客户概览</span></div>
            <div class="control-group1-p div_content">
                <fieldset>
                    <div class="control-group1">
                        <label class="control-label">客户姓名</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.buyer_name}" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">持证类型</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{:cart_type('cart',$result.cart_type)}" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">证件号码</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" style="width:150px;" value="{$result.customer_account}" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">联系电话</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.buyer_phone}" disabled>
                        </div>
                    </div>
                    <div class="control-group1" style="width:40%;">
                        <label class="control-label">联系地址</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.customer_address}" style="width:80%;" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">合同编号</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.contract_sn}" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">寄存时间</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.gm_start_time}" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">寄存时长</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.deposit_storage}年" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">到期时间</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.deposit_end_time}" disabled>
                        </div>
                    </div>
                    <div class="control-group1" style="width:35%;">
                        <label class="control-label">当前状态</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.deposit_status|default=''}" disabled>
                            <a class="btn btn-warning" data-title="续费信息" data-deposit_id="{$result_jc.id}"  data-url="{:url('renewal')}" data-deposit_cost="{$costset.deposit_cost}" id="Renewaldue" >到期续费</a>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">格位编号</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.tomb_num}" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">具体位置</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" style="width:150px;" value="{$result.tomb_region}{$result.tomb_address}" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">墓穴规制</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.tomb_regulation_name}" disabled>
                        </div>
                    </div>
                    <div class="control-group1">
                        <label class="control-label">寄存情况</label>
                        <div class="controls">
                            <input type="text" class="form-control" name="" value="{$result.deposit_status_mw|default=''}" disabled>
                        </div>
                    </div>
                </fieldset>
                <!---tab页-->
                <ul class="nav_tabs">
                    <li class="active"><a href="javascript:">寄出登记</a></li>
                    <li><a href="javascript:">审核意见</a></li>
                    <li><a href="javascript:">历史记录</a></li>
                </ul>
                <fieldset>
                    <div class="control-group1-p nav_content">
                            <div class="content_nav">
                                <form class="form_save_jc " action="{:url('')}" method="post">
                                <div class="p_title">
                                    <span class="span_title">迁出逝者</span>
                                </div>
                                <div class="control-group1-p" style="border:1px solid #e2e2e2; padding-top:20px;margin:0 20px;overflow:hidden; overflow-x:auto;">
                                <table class="table table-hover table-bordered">
                                    <thead>
                                        <tr>
                                            <td width="20">
                                                <input type="checkbox" class="js-check-all" data-direction="y" data-checklist='orderid' />
                                            </td>
                                            <th>逝者姓名</th>
                                            <th>性别</th>
                                            <th>生卒日期</th>
                                            <th>寄存时间</th>
                                            <th>收敛形式</th>
                                            <th >落葬类别</th>
                                            <th>与持证人关系</th>
                                            <th>火化证明</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                    <foreach name="deceased_list" item="vo">
                                        <tr>
                                            <td style="text-align: center">
                                                <if condition="$vo.move_status eq '1' || empty($vo.move_status)">
                                                    <input type="checkbox"   name="deceased_id" checked="checked"
                                                           value="{$vo.deceased_id}" title="ID:{$vo.deceased_id}">
                                                </if>

                                            </td>
                                            <td>
                                                <input type="hidden" class="form-control" name="order_id" value="{$result.order_id}" disabled>
                                                <input type="hidden" class="form-control" name="customer_id" value="{$result.customer_id}">
                                                <input type="hidden" class="form-control" name="tomb_id" value="{$result.tomb_id}">
                                                <input type="hidden" class="form-control" name="tomb_num" value="{$result.tomb_num}">
                                                <input type="hidden" class="form-control" name="dead_name" value="{$vo.deceased_name|default=''}">
                                                <input type="hidden" class="form-control" name="deposit_id" value="{$vo.deposit_id}">
                                                {$vo.deceased_name|default=''}
                                            </td>
                                            <td>
                                                <!--<if condition="1 eq $vo.gender">-->   男
                                                <!--<elseif condition="2 eq $vo.gender" />-->女
                                                <!-- </if>-->
                                                 </select>
                                             </td>
                                             <td>
                                                 {$vo['date_birth']|default=''} ~ {$vo['date_death']|default=''}
                                             </td>
                                             <td>{:unixtime_to_date($vo['deposit_time'],'Y-m-d')}</td>
                                             <td>
                                                 <!--<if condition="1 eq $vo.convergence_type">--> 骨灰
                                                 <!--<elseif condition="2 eq $vo.convergence_type" />-->骨殖
                                                 <!-- </if>-->
                                             </td>
                                             <td>
                                                 <!--<if condition="1 eq $vo.type">--> 首位安葬
                                                 <!--<elseif condition="2 eq $vo.type" />-->合葬
                                                 <!-- </if>-->
                                             </td>
                                             <td>{$vo.relationship_users|default=''}</td>
                                             <td>
                                                 <img height="50" src="{:cmf_get_image_preview_url($vo.cremation_certificate)}" style="height:36px;width: 36px;"
                                                      onclick="parent.imagePreviewDialog(this.src);">
                                                 <a href="{:url('Move/photodown',array('id'=>$vo['deceased_id']))}">导出</a>
                                             </td>
                                         </tr>
                                     </foreach>
                                     </tbody>
                                 </table>
                               </div>
                               <div class="p_title">
                                     <span class="span_title">联系人信息</span>
                                 </div>
                                 <div class="control-group1-p" style="border:1px solid #e2e2e2; padding-top:20px;margin:0 20px;overflow:hidden; overflow-x:auto;">

                                     <table class="table table-hover table-bordered">
                                         <thead>
                                             <tr>
                                                 <th width="8%">办理人</th>
                                                 <th width="5%">性别</th>
                                                 <th width="8%">手机号码</th>
                                                 <th width="6%"></th>
                                                 <th width="8%">关系</th>
                                                 <th width="8%">证件类型</th>
                                                 <th width="10%">证件号码</th>
                                                 <th width="10%">联系地址</th>
                                                 <th width="10%">预约寄出时间</th>
                                                 <th width="8%">证件上传</th>
                                                 <th width="6%">经办人</th>
                                                 <th width="6%">原证回收</th>
                                             </tr>
                                         </thead>
                                         <tbody>
                                             <tr>
                                                 <td>
                                                     <input type="hidden" class="form-control" name="service_id" value="{$service.id|default=''}">

                                                     <input type="text" class="form-control" class="form-control" name="buyer_name" value="{$service['dealer_user']|default=''}" style="width: 100px"></td>
                                                 <td><select name="buyer_sex" class="form-control">
                                                         <option value="1" <if condition ="$service.dealer_sex eq 1"> selected</if> >男</option>
                                                         <option value="2" <if condition ="$service.dealer_sex eq 2"> selected</if> >女</option>
                                                     </select>
                                                 </td>
                                                 <td><input type="text" class="form-control" name="buyer_phone" value="{$service.dealer_phone|default=''}" style="width: 130px"></td>
                                                 <td>  <input type="checkbox" name="is_send" checked style="width: 20px !important;" value="1">短信通知</td>
                                                 <td><select name="relationship" class="form-control">
                                                         <option value="本人办" '<if condition="'本人办' eq $service['relationship']">selected</if> >本人办</option>
                                                         <option value="他人代办" <if condition="'他人代办' eq $service['relationship']">selected</if>>他人代办</option>
                                                     </select></td>
                                                 <td><select name="cart_type" class="form-control">
                                                         <option value="1"  <if condition ="$service.dealer_cart_type eq 1"> selected</if>>身份证</option>
                                                         <option value="2"  <if condition ="$service.dealer_cart_type eq 2"> selected</if>>护照</option>
                                                         <option value="3"  <if condition ="$service.dealer_cart_type eq 3"> selected</if>>军人证</option>
                                                         <option value="4"  <if condition ="$service.dealer_cart_type eq 4"> selected</if>>港澳身份证</option>
                                                     </select></td>
                                                 <td><input type="text" class="form-control" name="cart_num" value="{$service.dealer_cart_num |default=''}"></td>
                                                 <td><input type="text" class="form-control" name="cart_address" value="{$service.dealer_address |default=''}"></td>
                                                 <td>
                                                     <input type="text" class="form-control js-datetime" autocomplete="off"  style="width: 150px;" name="move_time" id="move_time" value="{$service['move_time']|default=''}" required >
                                                 </td>
                                                 <td>
                                                     <php>$img_az=cmf_get_image_preview_url(isset($retreat['url_cart_file'])?$retreat['url_cart_file']:'');</php>
                                                     <input type="hidden" name="file_cart" id="file_cart" value="{$service.url_cart_file|default=''}">
                                                     <a href="javascript:gpyUploadOneImage('图片上传','#file_cart','{$result.tomb_num}');">
                                                         <h5 class="btn btn-primary">拍照上传</h5>
                                                     </a>
                                                     <img src="{$img_az}"  onclick="parent.imagePreviewDialog(this.src);"  id="file_cart-preview" width="36" style="cursor: hand"/></td>
                                                 <td>
                                                     <input type="hidden" name="type"  value="2" >
                                                     <input type="hidden" name="handle_name"   value="{:cmf_get_admin_name()}" >
                                                     <input type="text" class="form-control"  value="{:cmf_get_admin_name()}" disabled style="width: 100px"></td>
                                                 <td>

                                                     <input type="hidden"  id="submit_status" name="submit_status" value="">
                                                     <input type="hidden"  id="url_file_original" name="url_file_original" value="{$service.url_file_original|default=''}">
                                                     <a href="javascript:gpyUploadOneImage('原证回收上传','#url_file_original','{$result.tomb_num}');"  >
                                                         <h5 class="btn btn-primary">原证回收上传</h5>
                                                     </a>
                                                     <php>$img_ar=cmf_get_image_preview_url(isset($retreat['url_file_original'])?$retreat['url_file_original']:'');</php>
                                                     <img src="{$img_ar}"  onclick="parent.imagePreviewDialog(this.src);"  id="url_file_original-preview" width="36" style="cursor: hand"/></td>
                                                 </td>
                                             </tr>
                                         </tbody>
                                     </table>
                                   <div class="form-actions">
<!--                                       <div class="btn btn-primary" id="check-save">保存</div>-->
                                         <div class="btn btn-primary" id="check-btn-submit">提交</div>
                                     </div>
                                 </div>
                        </form>
                             </div>
                         <div class="content_nav check_nav feature" style="">
                             <if condition="isset($approvialinfo['approval_status'])">
                                 <if condition="$approvialinfo['approval_status'] == '1'">
                                     <div class="check_info">
                                         <P style="color:#0b7ebf">您的寄出业务已于<php >echo date('Y-m-d H:m', $approvialinfo['apply_time'])</php>成功提交</P>
                                         <P>申请处理中，请耐心等待！</P>
                                         <div class="btn btn-primary" id="">查看提交内容</div>
                                     </div>
                                 </if>

                                 <if condition="$approvialinfo['approval_status'] == '2'">
                                     <div class="check_info">
                                         <img src="__TMPL__/Public/assets/images/agree.jpg" />
                                         <P style="color:#4ABD41;font-size:20px;">您的寄出业务已申请通过</P>
                                         <P style="color:#999999;"><php >echo date('Y-m-d H:m', $approvialinfo['approval_time'])</php></P>
                                         <div>我们会准时为您提供迁出寄存业务</div>
                                         <div class="btn btn-primary" id="check-btn-print" style="margin-top:10px;">打印《迁出通知单》</div>
                                     </div>
                                 </if>
                                 <if condition="$approvialinfo['approval_status'] == '3'">
                                     <div class="check_info">
                                         <img src="__TMPL__/Public/assets/images/warn.jpg" />
                                         <P style="color:#EE860A;font-size:20px;">您的寄出业务已未申请通过</P>
                                         <P style="color:#999999;"><php >echo date('Y-m-d H:m', $approvialinfo['approval_time'])</php></P>
                                         <div style="padding:5px;max-width:200px;border:1px solid #f2f2f2;">未通过原因：{$approvialinfo['approval_desc']}</div>
                                         <div class="btn btn-primary" id="check-btn-fh" style="margin-top:10px;">返回修改</div>
                                     </div>
                                 </if>
                                 <else>

                                 </else>
                             </if>
                         </div>
                         <div class="content_nav feature">
                             <div class="p_title">
                                 <span class="span_title">寄出记录</span>
                             </div>
                             <div class="control-group1-p" style="border:1px solid #e2e2e2; padding-top:20px;margin:0 20px;overflow:hidden; overflow-x:auto;">
                              <table class="table table-hover table-bordered" style="max-width: 100% !important;width: 100% !important;" id="SendRecords">
                                 <thead>
                                     <tr>
                                         <td width="20">
                                             <input type="checkbox" class="js-check-all" data-direction="y" data-checklist='orderid' />
                                         </td>
                                         <th>操作时间</th>
                                         <th>办理人信息</th>
                                         <th>逝者信息</th>
                                         <th>寄存时间</th>
                                         <th>收敛形式</th>
                                         <th >火化证明</th>
                                         <th >原证回收</th>
                                         <th >寄出时间</th>
                                         <th >寄出类型</th>
                                         <th >接待人</th>
                                         <th >状态反馈</th>
                                         <th >备注</th>
                                     </tr>
                                 </thead>
                                 <tbody>
                                 </tbody>
                             </table>
                           </div>
                           <div class="p_title">
                                 <span class="span_title">续费记录</span>
                             </div>
                             <div class="control-group1-p" style="border:1px solid #e2e2e2; padding-top:20px;margin:0 20px;overflow:hidden; overflow-x:auto;">
                             <form action="{:url('Rock/order')}" method="post">
                             <table class="table table-hover table-bordered" id="RenewalRecordPay">
                                 <thead>
                                     <tr>
                                         <td width="20">
                                             <input type="checkbox" class="js-check-all" data-direction="y" data-checklist='orderid' />
                                         </td>
                                         <th>操作时间</th>
                                         <th>办理人信息</th>
                                         <th>逝者信息</th>
                                         <th>寄存时间</th>
                                         <th>收敛形式</th>
                                         <th >火化证明</th>
                                         <th >续费标准</th>
                                         <th >续费时长</th>
                                         <th >政策减免</th><th >收款金额</th>
                                         <th >接待人</th>
                                         <th >延期至</th>
                                         <th >备注</th>
                                     </tr>
                                 </thead>
                             </table>
                             </form>
                           </div>
                           <div class="form-actions">
                                 <div class="btn btn-primary" id="check-btn">补打登记</div>
                             </div>
                         </div>
                     </div>
                 </fieldset>
             </div>
         </div>
     </div>
     <script type="text/javascript" src="__STATIC__/js/admin.js?v={:time()}"></script>
     <script type="text/javascript" src="__STATIC__/js/init_base.js?v={:time()}"></script>
     <script type="text/javascript">
     </script>

 </body>
 </html>